<?php
namespace Api;

use Kuyuan\WqCore\api\Api;
use Kuyuan\WqCore\util\Util;

/**
 * 修改红包
 * Class SendRed
 * @package Api
 */
class EditRed extends Api
{
    private $Red = null;

    public function __construct()
    {
        parent::__construct();
        $this->Red = $this->newController("Red");
    }

    /**
     * 修改红包
     */
    public function index()
    {
        Util::appointPost();
        if($this->Red->edit($this->_gpc["red_id"],$this->_gpc["data"])) {
            $_result = array("code"=>0);
        } else {
            $_result = array("code"=>103);
        }
        Util::returns($_result);
    }
}